@ECHO OFF
ECHO.
ECHO Input the M51 file in UNIX path style. For example:  ../Auto_gen_BL_HEX/USB_BL_F320_1_16K.M51
ECHO.
CD %~pd0\
if "%1%" == "" GOTO DONE

ECHO Parse file %1%
ECHO.
GREP VID			 %1% | GREP PUBLIC
GREP PID			 %1% | GREP PUBLIC
GREP MFRSTR 		 %1% | GREP PUBLIC
GREP PRDSTR 		 %1% | GREP PUBLIC
GREP MAXPOWER   	 %1% | GREP PUBLIC
GREP PWATTRIBUTES    %1% | GREP PUBLIC
GREP BCDDEVICE  	 %1% | GREP PUBLIC
GREP SERIAL 		 %1% | GREP PUBLIC
GREP SERIAL_BL  	 %1% | GREP PUBLIC

:DONE
ECHO. 
ECHO.
ECHO All Done
PAUSE


